The invention relates generally to the field of signal analysis, and more particularly, to a system and method for detecting the frequency, amplitude and/or phase of one or more tones comprised within an input signal.
In many applications, it is necessary or desirable to precisely locate one or more tones comprised in a signal. This need arises in many fields including telecommunications, radar, sonar, networking, measurement, and various other applications. Prior art techniques for detecting tones in a signal generally may not produce accurate results and/or may suffer from slow performance.
The discrete Fourier transform (DFT) is a popular tool for analyzing signals. However, before an input signal is transformed, it is quite often windowed with a windowing function. (It is noted that the action of capturing a finite-length sequence of samples of the input signal automatically implies a rectangular windowing.) The frequency transform F(n) of the windowed input signal will typically exhibit multiple scaled and shifted versions of transform function W, i.e., the transform of the window function. Each sinusoidal component of the input signal expresses itself as a pair of such shifted versions, one version shifted up to the frequency fj of the sinusoidal component, and the other shifted down to frequency xe2x88x92fj. The positive frequency version is referred to herein as a positive frequency image, and the negative frequency version is referred to herein as a negative frequency image. When a sinusoidal component frequency fj is small compared to the sample rate, the positive frequency image and the negative frequency image for the sinusoidal component may overlap in frequency space. Similarly, when a sinusoidal component frequency fj is close to one-half the sample rate, the positive frequency image and the negative frequency image for the sinusoidal component may overlap. Furthermore, when two sinusoidal components have frequencies that are close together, their positive images and negative images may overlap.
Prior art techniques for tone estimation quite often focus on identifying the peaks in the magnitude spectrum |F(n)|. The peaks roughly determine the frequency of the corresponding tones. However, because of the cross-interaction of the images from other tones, or the negative frequency image from the same tone, the peak of a positive frequency image may be perturbed away from a purely scaled and frequency-shifted version of the template function W. Thus, parameter estimation techniques which compute parameters for a given tone based only on transform array values (i.e. DFT values) in the vicinity of a corresponding image peak may not produce accurate results. Therefore, there exists a substantial need for a system and method which could estimate tone parameters from the transform array with increased accuracy.
The present invention comprises various embodiments of a system and a method for estimating signal parameters (e.g., one or more of frequency, amplitude and/or phase) of one or more tones present in an input signal. More particularly, one embodiment of the invention comprises a system and method for estimating parameters for a tone based on a frequency transform F(n) of the input signal. The input signal may be windowed with a window function w(n) and transformed into the frequency domain.
The tone in the input signal may express itself in the frequency domain as an additive combination of two spectra, one centered at the tone frequency and the other at the negative of the tone frequency. These two spectra are referred to herein as the positive frequency image and the negative frequency image respectively. A tone in the input signal may also be affected by spectra (e.g., positive or negative images) from other tones present in the signal.
The method may comprise first receiving samples of the input signal, wherein the input signal includes the tone. A frequency transform of the samples may then be generated, e.g., a Fourier transform of the samples. The method may then identify a frequency location proximate to an amplitude peak in the frequency transform, wherein the amplitude peak corresponds to the tone. Two or more frequency bins may then be selected proximate to the identified frequency location in the frequency transform. The method preferably selects one or more frequency bins located on either side of the frequency location of the amplitude peak. In other words, the method may select one or more bins located on one side of the amplitude peak and one or more bins located on the other side of the amplitude peak.
The method may then determine a tone frequency value that minimizes a difference between two or more expressions, e.g., at least a first expression and a second expression. Stated another way, the method may select a tone frequency value that makes a plurality of expressions most nearly equal.
Each of the plurality of expressions may comprise a sum of one or more numerator terms divided by a sum of one or more denominator terms, wherein:
1) each of the plurality of expressions includes a tone frequency variable;
2) each numerator term and each denominator term corresponds to one of the frequency bins; and
3) a ratio of each numerator term and its corresponding denominator term represent a complex amplitude of the tone at a respective bin.
Thus, for example, the plurality of expressions may comprise a first expression and a second expression having the above characteristics.
In each expression, the tone frequency variable may represent a correct tone frequency value of the tone. The first expression may be approximately equivalent to the second expression when the correct tone frequency value is used for the tone frequency variable in the first and second complex expressions.
The step of determining a tone frequency value may comprise computing a plurality of differences between the first expression and the second expression for different respective tone frequency values of the tone frequency variable, and then selecting the tone frequency value that produces a smallest difference. The method may compute the plurality of differences by performing a Newton-Rhapson root finding method.
The expressions may be real expressions or complex expressions. Where the expressions are complex expressions, the method may involve minimizing a difference between an amplitude of the first complex expression and an amplitude of the second complex expression.
In the preferred embodiment, the first expression and the second expression have the form:       "LeftBracketingBar"                            ∑                      k            +            1                                k            +            M                          ⁢                  (                                                    F                ⁢                                  (                  n                  )                                            ⁢                                                W                  *                                ⁢                                  (                                                            f                      n                                        -                                          f                      i                                                        )                                                      -                                                            F                  *                                ⁢                                  (                  n                  )                                            ⁢                              W                ⁢                                  (                                                            f                      n                                        +                                          f                      i                                                        )                                                              )                                      ∑                      k            +            1                                k            +            M                          ⁢                  (                                                    "LeftBracketingBar"                                  W                  ⁢                                      (                                                                  f                        n                                            -                                              f                        i                                                              )                                                  "RightBracketingBar"                            2                        -                                          "LeftBracketingBar"                                  W                  ⁢                                      (                                                                  f                        n                                            +                                              f                        i                                                              )                                                  "RightBracketingBar"                            2                                )                      "RightBracketingBar"    =      "LeftBracketingBar"                            ∑                      k            +            1                                k            +            M            -            1                          ⁢                  (                                                    F                ⁢                                  (                  n                  )                                            ⁢                                                W                  *                                ⁢                                  (                                                            f                      n                                        -                                          f                      i                                                        )                                                      -                                                            F                  *                                ⁢                                  (                  n                  )                                            ⁢                              W                ⁢                                  (                                                            f                      n                                        +                                          f                      i                                                        )                                                              )                                      ∑                      k            +            1                                k            +            M            -            1                          ⁢                  (                                                    "LeftBracketingBar"                                  W                  ⁢                                      (                                                                  f                        n                                            -                                              f                        i                                                              )                                                  "RightBracketingBar"                            2                        -                                          "LeftBracketingBar"                                  W                  ⁢                                      (                                                                  f                        n                                            +                                              f                        i                                                              )                                                  "RightBracketingBar"                            2                                )                      "RightBracketingBar"  
wherein:
F(n) is the nth value of the single sided scaled FFT spectrum; and
W represents a window function, wherein the window function is shifted by a value of the tone frequency variable fi.
When the frequency transform of the samples comprises generating a power spectrum of the samples, the first expression and the second expression have the form:       "LeftBracketingBar"                            ∑                      k            +            1                                k            +            M                          ⁢                  (                                    "LeftBracketingBar"                              F                ⁢                                  (                  n                  )                                            "RightBracketingBar"                        xc3x97                          "LeftBracketingBar"                              W                ⁢                                  (                                                            f                      n                                        -                                          f                      i                                                        )                                            "RightBracketingBar"                                )                                      ∑                      k            +            1                                k            +            M                          ⁢                              "LeftBracketingBar"                          W              ⁢                              (                                                      f                    n                                    -                                      f                    i                                                  )                                      "RightBracketingBar"                    2                      "RightBracketingBar"    =      "LeftBracketingBar"                            ∑                      k            +            1                                k            +            M            -            1                          ⁢                  (                                    "LeftBracketingBar"                              F                ⁢                                  (                  n                  )                                            "RightBracketingBar"                        xc3x97                          "LeftBracketingBar"                              W                ⁢                                  (                                                            f                      n                                        -                                          f                      i                                                        )                                            "RightBracketingBar"                                )                                      ∑                      k            +            1                                k            +            M            -            1                          ⁢                              "LeftBracketingBar"                          W              ⁢                              (                                                      f                    n                                    -                                      f                    i                                                  )                                      "RightBracketingBar"                    2                      "RightBracketingBar"  
wherein:
F(n) is the nth value of the single sided scaled FFT spectrum; and
W represents a window function, wherein the window function is shifted by a value of the tone frequency variable fi.
The determined tone frequency value may comprise an approximation of the correct frequency of the tone. In other words, the determined tone frequency value represents an approximation of the correct tone frequency value. The method described herein operates to find a more exact approximation of the frequency of the tone than prior art techniques, even in the presence of noise or interference from other tones, or the negative image of the respective tone being found.
After the tone frequency value has been determined, the method may comprise storing the determined tone frequency value in a memory, or outputting the determined tone frequency value, e.g., on a display or to other systems for further analysis or processing.
The method may also then compute one or more of the amplitude and phase of the tone using the determined tone frequency value. For example, once the fi value is known, the amplitude and phase can be computed as:             A      i        ⁢          ⅇ              j        ⁢                  xe2x80x83                ⁢                  ϕ          i                      =      C    =                            ∑                      k            +            1                                k            +            M                          ⁢                  (                                                    F                ⁢                                  (                  n                  )                                            ⁢                                                W                  *                                ⁢                                  (                                                            f                      n                                        -                                          f                      i                                                        )                                                      -                                                            F                  *                                ⁢                                  (                  n                  )                                            ⁢                              W                ⁢                                  (                                                            f                      n                                        +                                          f                      i                                                        )                                                              )                                      ∑                      k            +            1                                k            +            M                          ⁢                  (                                                    "LeftBracketingBar"                                  W                  ⁢                                      (                                                                  f                        n                                            -                                              f                        i                                                              )                                                  "RightBracketingBar"                            2                        -                                          "LeftBracketingBar"                                  W                  ⁢                                      (                                                                  f                        n                                            +                                              f                        i                                                              )                                                  "RightBracketingBar"                            2                                )                    
When the frequency transform of the samples comprises generating a power spectrum of the samples, the amplitude can be computed as:       A    i    =      "LeftBracketingBar"                            ∑                      k            +            1                                k            +            M                          ⁢                  (                                    "LeftBracketingBar"                              F                ⁢                                  (                  n                  )                                            "RightBracketingBar"                        xc3x97                          "LeftBracketingBar"                              W                ⁢                                  (                                                            f                      n                                        -                                          f                      i                                                        )                                            "RightBracketingBar"                                )                                      ∑                      k            +            1                                k            +            M                          ⁢                              "LeftBracketingBar"                          W              ⁢                              (                                                      f                    n                                    -                                      f                    i                                                  )                                      "RightBracketingBar"                    2                      "RightBracketingBar"  
Where the input signal comprises a plurality of tones, the method may operate to correctly find signal parameters of any one of the plurality of tones. Where it is desired to locate two or more of, or all of, the tones present in the input signal, the above steps may be iteratively performed for each of the plurality of tones to determine at least one signal parameter for each of the plurality of tones in the input signal. The above method may be performed iteratively wherein, after a respective tone is identified, the respective tone may be subtracted from the input signal, and the above process repeated for another tone, and so on.
Thus the method of the present invention operates to find more correct approximations of signal parameters of tones present in an input signal, and operates more efficiently than prior art techniques.